import React, { useState } from "react";
// 1. [0,0,[0,0]] vs [0,0,[0,1]]
// 2. https://github.com/facebook/react/blob/master/packages/react-reconciler/src/ReactFiberHooks.old.js
// 3. FiberNode -> memoizedState -> LinkedList<Hook | Effect>
// 4. why not hashMap ? 
const HookInner = (props) => {
  const [counter, setCounter] = useState(() => {
    debugger;
    return 1;
  });
  const [counter2, setCounter2] = useState(() => {
    return 1;
  });
  debugger;
  return (
    <div
      onClick={() => {
        setCounter(() => {
          debugger;
          return 2;
        });
        setCounter(3);
        setCounter(4);
        debugger;
      }}
    >
      {counter}
    </div>
  );
};
export default HookInner;
